/**
 * 作者: wgx
 * 日期: 2024-12-17 16:35:42
 * 备注: 主线任务和成就配置表
 */
package com.motu.monstercity.server.game.commondata.maintask;

import io.vertx.core.json.JsonObject;

public class TaskAchieveModel {
    protected int id; // 数据库ID
    protected int type; // 类型1-主线任务,2-成就
    protected int taskType; // 任务类型
    protected int param; // 具体参数
    protected long num; // 需要达到的数值
    protected String reward; // 奖励

    public TaskAchieveModel() {
    }

    public TaskAchieveModel(JsonObject obj) {
        id = obj.containsKey("id") ? obj.getInteger("id") : 0;
        type = obj.containsKey("type") ? obj.getInteger("type") : 0;
        taskType = obj.containsKey("task_type") ? obj.getInteger("task_type") : 0;
        param = obj.containsKey("param") ? obj.getInteger("param") : 0;
        num = obj.containsKey("num") ? obj.getLong("num") : 0;
        reward = obj.containsKey("reward") ? obj.getString("reward") : "";
    }

    public int getId() {
        return id;
    }

    public int getType() {
        return type;
    }

    public int getTaskType() {
        return taskType;
    }

    public int getParam() {
        return param;
    }

    public long getNum() {
        return num;
    }

    public String getReward() {
        return reward;
    }

}
